home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-09-17 | 9.2 KB | 223 lines | [TEXT/MPS ] |
- **************************************************************************
- VUAssist, The V.U. Assistance Module for MacApp Applications
- **************************************************************************
-
- In order to find the location of items in windows for V.U., Agent VU peruses
- the content list of windows and the item list of dialogs. For applications
- which are not built with MacApp, these data structures can be accessed via
- global variables by Agent VU. For MacApp applications, however, items in
- windows are subclasses of the class TView, which are not available to the
- Agent via global data structures. As a result, Agent VU can’t provide any
- information about these items to V.U. in the normal way.
-
- To work around this problem, Agent VU provides a hook which allows an
- application to assist Agent VU by providing information about itself.
- In this folder, we’ve provided VUAssist, an assistance module for MacApp
- applications which can be hooked onto Agent VU to provide information about
- a MacApp application. A user can build a MacApp application with VUAssist
- and then test the application with V.U.. V.U. will "recognize" many of the
- application's views which translate into standard user interface items: buttons,
- scroll bars, checkboxes, static text, editable text fields, popup menus, etc.
-
- The module exists as a unit called UVUAssist. The unit consists of four files:
- VUAssist.p, VUAssist.inc1.p, VUAssist.inc2.p, and VUAssist.a.
-
-
- -----------------------------------------------------------------------------
- What's New in this Version - 1.0d10
- -----------------------------------------------------------------------------
-
- 1) VUAssist has now been defined as a descendant of TEvtHandler. This allows
- VUAssist to be installed as a cohandler. The frequency with which VUAssist's
- DoIdle routine is called can now be controlled. This gives the user of VUAssist
- a convenient way to control the responsiveness of the application to Virtual User.
-
- 2) VUAssist's handling of TGridView objects has changed somewhat. The cells of
- TGridView objects now appear as "contentItems" to V.U. as opposed to "userItems".
- This is more consistent with V.U.'s interface item hierarchy. Useritems are
- really intended to describe Dialog Manager userItems while contentItems are
- effectively the "base class" of all interface items in V.U.. Since there is no
- class of interface items in V.U. which is intended to describe the cells of
- gridviews, they should be considered to belong to the "base class", contentItem.
-
- 3) The feature of VUAssist which maps the cells of gridviews to "contentitems"
- can be disabled through the boolean gridItemSupport argument to the IVUAssist
- method.
-
- 4) The implementation of some of the methods of VUAssist have been modified to
- improve performance.
-
- 5) Applications built with VUAssist would sometimes crash if running on a Mac
- Plus when V.U. tried to manipulate a "Save As…" dialog. This problem has been
- fixed in this version of VUAssist.
-
- !!!!! NOTICE !!!!!
- 6) The instructions for building VUAssist into your application have changed
- slightly since the 1.0d7 version, which was shipped with V.U. 1.0 final.
- Therefore the instructions given in the Virtual User General Reference are not
- valid for this version. The new instructions are given below.
-
-
- -----------------------------------------------------------------------------
- How to Use VUAssist
- -----------------------------------------------------------------------------
-
- To build VUAssist into your MacApp application, follow the instructions
- below.
-
- For applications written in Object Pascal:
-
- 1) Modify your MAMake file to include the following:
-
- • add the following to the list of OtherInterfaces
-
- "{SrcApp}UVUAssist.a" ∂
- "{SrcApp}UVUAssist.p" ∂
-
- • add the following to the list of OtherLinkFiles
-
- "{ObjApp}UVUAssist.a.o" ∂
- "{ObjApp}UVUAssist.p.o"
-
- • add the additional dependency:
-
- "{ObjApp}UVUAssist.p.o" ƒ ∂
- "{SrcApp}UVUAssist.p" ∂
- "{SrcApp}UVUAssist.inc1.p" ∂
- "{SrcApp}UVUAssist.inc2.p" ∂
- {MacAppIntf} ∂
- {BuildingBlocksIntf}
-
- 2) Modify or subclass your descendant of TApplication to do the following:
-
- • In MyApplication.IApplication, you must execute this:
- NEW(gVUAssist);
- FailNil(gVUAssist);
- gVUAssist.IVUAssist(gridItemSupport); { gridItemSupport must be a boolean
- expression. See "Altering the
- behavior of VUAssist for an
- explanation of gridItemSupport }
- • In MyApplication.AboutToLoseControl you must execute this:
- gVUAssist.SuspendMole;
-
- • In MyApplication.RegainControl you must execute this:
- gVUAssist.ResumeMole;
-
- • In MyApplication.Close you must execute this BEFORE calling INHERITED Close:
- SELF.InstallCohandler(gVUAssist,false);
-
- 3) Include the unit UVUAssist in your USES clause where appropriate. Other units,
- such as UPrinting, UTEView, UDialog, and UGridView may need to be included along
- with UVUAssist if they are not already.
-
-
- For applications written in C++:
-
- 1) Modify your MAMake file to include the following:
-
- • add the following to the list of OtherInterfaces
-
- "{SrcApp}UVUAssist.a" ∂
- "{SrcApp}UVUAssist.p" ∂
- "{SrcApp}UVUAssist.h"
-
- • add the following to the list of OtherLinkFiles
-
- "{ObjApp}UVUAssist.a.o" ∂
- "{ObjApp}UVUAssist.p.o"
-
- • add the additional dependency:
-
- "{ObjApp}UVUAssist.p.o" ƒ ∂
- "{SrcApp}UVUAssist.p" ∂
- "{SrcApp}UVUAssist.inc1.p" ∂
- "{SrcApp}UVUAssist.inc2.p" ∂
- {MacAppIntf} ∂
- {BuildingBlocksIntf}
-
- 2) Modify or subclass your descendant of TApplication to do the following:
-
- • In MyApplication.IApplication, you must execute this:
- gVUAssist = new TVUAssist;
- FailNIL(gVUAssist);
- gVUAssist->IVUAssist(gridItemSupport); /* gridItemSupport must be a boolean
- expression. See "Altering the
- behavior of VUAssist for an
- explanation of gridItemSupport */
-
- • In MyApplication.AboutToLoseControl you must execute this:
- gVUAssist->SuspendMole();
-
- • In MyApplication.RegainControl you must execute this:
- gVUAssist->ResumeMole();
-
- • In MyApplication.Close you must execute this BEFORE calling INHERITED Close:
- this->InstallCohandler(gVUAssist,false);
-
- 3) Include the header file UVUAssist.h where appropriate.
-
- #ifndef __UVUASSIST__
- #include "UVUAssist.h"
- #endif
-
-
- 4) If you are using C++, make sure to use the VUAssist.a file which is included
- in the folder "C++ Interface to VUAssist" in place of the file with the same
- name which is found in the folder "VUAssist Source Code".
-
-
- -----------------------------------------------------------------------------
- Modifying the Behavior of VUAssist
- -----------------------------------------------------------------------------
-
- 1) VUAssist Idle Frequency
-
- VUAssist has now been defined to be a descendant of TEvtHandler (or TEventHandler
- in MacApp 3.0). An application's responsiveness to V.U. queries can be controlled
- by setting the idle frequency of VUAssist. Although nothing is done with this idle
- time, it forces the application to awaken and call SystemTask with the application's
- context switched in. This is necessary for Agent VU, a driver, to get processing
- time. Agent VU, in turn, calls VUAssist. So, in a roundabout way, the application's
- responsiveness to V.U. can be controlled by setting the idle frequency of VUAssist.
-
- By default, the idle frequency of VUAssist has been set to 1, the near maximum
- frequency. You may want to alter this by executing the following statement:
-
- gVUAssist.SetIdleFreq(newIdleFreq);
-
- Note, however, that larger values of VUAssist's idle frequency will slow down the
- application's responsiveness to V.U. unless there is another cohandler with a very
- high idle frequency.
-
-
- 2) The gridItemSupport Argument
-
- Note that the TVUAssist method IVUAssist now takes an argument, gridItemSupport.
- This argument, if true, enables an optional feature of VUAssist where the cells
- of gridviews are recognized as individual user interface items by V.U.. Virtual
- User does not yet have a gridview or list descriptor. So, for the short term,
- the "gridItemSupport" feature treats each cell of a gridview as a "contentitem"
- in the V.U. scripting language.
-
- In applications with very large gridviews, it may not be desirable to treat each
- cell in a gridview as a separate item in V.U.. This may hamper performance. By
- setting the value of the gridItemSupport argument to false, you will disable V.U.'s
- griditem support feature and the cells of gridviews will not be seen as
- "contentItems" by V.U.. The cells will be "invisible" to Virtual User.
-
- **** WARNING!! *******************************************************************
- If the "gridItemSupport" feature is enabled, the following rules MUST be followed:
-
- 1) Any descendants of TTextGridView in your application MUST override the method
- TTextGridView.GetText. This method is called by VUAssist to obtain the text
- associated with a gridview cell. TTextGridView.GetText is a method which must be
- overridden in MacApp.
-
- 2) For reasons analogous to those above, any descendants of TTextListView in your
- application MUST override the method TTextListView.GetItemText.
- TTextListView.GetText need not be overridden.
- ***********************************************************************************
-
-
-
-